<html><head>
<link rel="stylesheet" href="_style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="GL" rel="Chapter" href="GL.html">
<link title="Glu" rel="Chapter" href="Glu.html">
<link title="Glut" rel="Chapter" href="Glut.html">
<link title="VertArray" rel="Chapter" href="VertArray.html">
<link title="VBO" rel="Chapter" href="VBO.html">
<link title="GLE" rel="Chapter" href="GLE.html">
<link title="Ftgl" rel="Chapter" href="Ftgl.html">
<link title="Jpeg_loader" rel="Chapter" href="Jpeg_loader.html">
<link title="Png_loader" rel="Chapter" href="Png_loader.html">
<link title="Svg_loader" rel="Chapter" href="Svg_loader.html">
<link title="Genimg_loader" rel="Chapter" href="Genimg_loader.html">
<link title="FunGL" rel="Chapter" href="FunGL.html">
<link title="FunGlut" rel="Chapter" href="FunGlut.html"><title>VBO</title>
</head>
<body>
<code class="code"><span class="keyword">sig</span><br>
&nbsp;&nbsp;<span class="keyword">type</span>&nbsp;vbo_id<br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;glGenBuffer&nbsp;:&nbsp;unit&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">VBO</span>.vbo_id&nbsp;=&nbsp;<span class="string">"ml_glgenbuffer"</span>&nbsp;<span class="string">"noalloc"</span><br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;glGenBuffers&nbsp;:&nbsp;n:int&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">VBO</span>.vbo_id&nbsp;array&nbsp;=&nbsp;<span class="string">"ml_glgenbuffers"</span><br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;glDeleteBuffer&nbsp;:&nbsp;vbo:<span class="constructor">VBO</span>.vbo_id&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit&nbsp;=&nbsp;<span class="string">"ml_gldeletebuffer"</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="string">"noalloc"</span><br>
&nbsp;&nbsp;<span class="keyword">val</span>&nbsp;glDeleteBuffers&nbsp;:&nbsp;vbos:<span class="constructor">VBO</span>.vbo_id&nbsp;array&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;<span class="keyword">type</span>&nbsp;buffer_object_target&nbsp;=<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="constructor">GL_ARRAY_BUFFER</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_ELEMENT_ARRAY_BUFFER</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_PIXEL_PACK_BUFFER</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_PIXEL_UNPACK_BUFFER</span><br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;glBindBuffer&nbsp;:<br>
&nbsp;&nbsp;&nbsp;&nbsp;target:<span class="constructor">VBO</span>.buffer_object_target&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;vbo:<span class="constructor">VBO</span>.vbo_id&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="string">"ml_glbindbuffer"</span>&nbsp;<span class="string">"noalloc"</span><br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;glUnbindBuffer&nbsp;:&nbsp;target:<span class="constructor">VBO</span>.buffer_object_target&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="string">"ml_glunbindbuffer"</span>&nbsp;<span class="string">"noalloc"</span><br>
&nbsp;&nbsp;<span class="keyword">type</span>&nbsp;vbo_usage_pattern&nbsp;=<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="constructor">GL_STREAM_DRAW</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_STREAM_READ</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_STREAM_COPY</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_STATIC_DRAW</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_STATIC_READ</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_STATIC_COPY</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_DYNAMIC_DRAW</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_DYNAMIC_READ</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_DYNAMIC_COPY</span><br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;glBufferData&nbsp;:<br>
&nbsp;&nbsp;&nbsp;&nbsp;target:<span class="constructor">VBO</span>.buffer_object_target&nbsp;<span class="keywordsign">-&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;size:int&nbsp;<span class="keywordsign">-&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;data:(<span class="keywordsign">'</span>a,&nbsp;<span class="keywordsign">'</span>b,&nbsp;<span class="constructor">Bigarray</span>.c_layout)&nbsp;<span class="constructor">Bigarray</span>.<span class="constructor">Array1</span>.t&nbsp;<span class="keywordsign">-&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;usage:<span class="constructor">VBO</span>.vbo_usage_pattern&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit&nbsp;=&nbsp;<span class="string">"ml_glbufferdata"</span><br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;glBufferDataNull&nbsp;:<br>
&nbsp;&nbsp;&nbsp;&nbsp;target:<span class="constructor">VBO</span>.buffer_object_target&nbsp;<span class="keywordsign">-&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;size:int&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;usage:<span class="constructor">VBO</span>.vbo_usage_pattern&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit&nbsp;=&nbsp;<span class="string">"ml_glbufferdata_null"</span><br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;glBufferSubData&nbsp;:<br>
&nbsp;&nbsp;&nbsp;&nbsp;target:<span class="constructor">VBO</span>.buffer_object_target&nbsp;<span class="keywordsign">-&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;offset:int&nbsp;<span class="keywordsign">-&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;size:int&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;data:(<span class="keywordsign">'</span>a,&nbsp;<span class="keywordsign">'</span>b,&nbsp;<span class="constructor">Bigarray</span>.c_layout)&nbsp;<span class="constructor">Bigarray</span>.<span class="constructor">Array1</span>.t&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="string">"ml_glbuffersubdata"</span><br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;elem_size&nbsp;:<br>
&nbsp;&nbsp;&nbsp;&nbsp;ba:(<span class="keywordsign">'</span>a,&nbsp;<span class="keywordsign">'</span>b,&nbsp;<span class="constructor">Bigarray</span>.c_layout)&nbsp;<span class="constructor">Bigarray</span>.<span class="constructor">Array1</span>.t&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="string">"ml_ba_elem_size"</span><br>
&nbsp;&nbsp;<span class="keyword">val</span>&nbsp;ba_sizeof&nbsp;:&nbsp;ba:(<span class="keywordsign">'</span>a,&nbsp;<span class="keywordsign">'</span>b,&nbsp;<span class="constructor">Bigarray</span>.c_layout)&nbsp;<span class="constructor">Bigarray</span>.<span class="constructor">Array1</span>.t&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;int<br>
&nbsp;&nbsp;<span class="keyword">type</span>&nbsp;access_policy&nbsp;=&nbsp;<span class="constructor">GL_READ_ONLY</span>&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_WRITE_ONLY</span>&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_READ_WRITE</span><br>
&nbsp;&nbsp;<span class="keyword">type</span>&nbsp;mapped_buffer<br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;glMapBufferAbs&nbsp;:<br>
&nbsp;&nbsp;&nbsp;&nbsp;target:<span class="constructor">VBO</span>.buffer_object_target&nbsp;<span class="keywordsign">-&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;access:<span class="constructor">VBO</span>.access_policy&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">VBO</span>.mapped_buffer&nbsp;=&nbsp;<span class="string">"ml_glmapbuffer_abs"</span><br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;glUnmapBuffer&nbsp;:&nbsp;target:<span class="constructor">VBO</span>.buffer_object_target&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit<br>
&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="string">"ml_glunmapbuffer"</span><br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;mapped_buffer_blit&nbsp;:<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="constructor">VBO</span>.mapped_buffer&nbsp;<span class="keywordsign">-&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;(float,&nbsp;<span class="constructor">Bigarray</span>.float32_elt,&nbsp;<span class="constructor">Bigarray</span>.c_layout)&nbsp;<span class="constructor">Bigarray</span>.<span class="constructor">Array1</span>.t&nbsp;<span class="keywordsign">-&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;len:int&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit&nbsp;=&nbsp;<span class="string">"mapped_buffer_blit"</span><br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;mapped_buffer_blit_ofs&nbsp;:<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="constructor">VBO</span>.mapped_buffer&nbsp;<span class="keywordsign">-&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;(float,&nbsp;<span class="constructor">Bigarray</span>.float32_elt,&nbsp;<span class="constructor">Bigarray</span>.c_layout)&nbsp;<span class="constructor">Bigarray</span>.<span class="constructor">Array1</span>.t&nbsp;<span class="keywordsign">-&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;ofs:int&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;len:int&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;unit&nbsp;=&nbsp;<span class="string">"mapped_buffer_blit_ofs"</span><br>
&nbsp;&nbsp;<span class="keyword">type</span>&nbsp;bo_param&nbsp;=<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="constructor">GL_BUFFER_ACCESS</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_BUFFER_MAPPED</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_BUFFER_SIZE</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keywordsign">|</span>&nbsp;<span class="constructor">GL_BUFFER_USAGE</span><br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;glGetBufferAccess&nbsp;:<br>
&nbsp;&nbsp;&nbsp;&nbsp;target:<span class="constructor">VBO</span>.buffer_object_target&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">VBO</span>.access_policy<br>
&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="string">"ml_glGetBufferParameter_ACCESS"</span><br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;glGetBufferMapped&nbsp;:&nbsp;target:<span class="constructor">VBO</span>.buffer_object_target&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;bool<br>
&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="string">"ml_glGetBufferParameter_MAPPED"</span><br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;glGetBufferSize&nbsp;:&nbsp;target:<span class="constructor">VBO</span>.buffer_object_target&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;int<br>
&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="string">"ml_glGetBufferParameter_SIZE"</span><br>
&nbsp;&nbsp;<span class="keyword">external</span>&nbsp;glGetBufferUsage&nbsp;:<br>
&nbsp;&nbsp;&nbsp;&nbsp;target:<span class="constructor">VBO</span>.buffer_object_target&nbsp;<span class="keywordsign">-&gt;</span>&nbsp;<span class="constructor">VBO</span>.vbo_usage_pattern<br>
&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="string">"ml_glGetBufferParameter_USAGE"</span><br>
<span class="keyword">end</span></code></body></html>